import { App, h } from 'vue';
import GunsFlowUi from '@javaguns/flow-ui';
import { pluginManager } from '@javaguns/utils';
import Request from './request';
export default {
	install(app: App) {
		app.use(GunsFlowUi, {
			ui: 'ant-design-vue',
			axios: Request,
		});
		pluginManager.component('Button', async () => (await import('element-plus')).ElButton);
		pluginManager.component('Input', async () => (await import('element-plus')).ElInput);
		pluginManager.component('InputNumber', async () => (await import('element-plus')).ElInputNumber);
		pluginManager.component('InputSearch', async () => (await import('element-plus')).ElInput);
		pluginManager.component('Textarea', async () => (await import('element-plus')).ElInput);
		pluginManager.component('Drawer', async () => (await import('element-plus')).ElDrawer);
		pluginManager.component('Dialog', async () => (await import('element-plus')).ElDialog);
		pluginManager.component('Menu', async () => (await import('element-plus')).ElMenu);
		pluginManager.component('Submenu', async () => h('div'));
		pluginManager.component('MenuItem', async () => (await import('element-plus')).ElMenuItem);
		pluginManager.component('Card', async () => (await import('element-plus')).ElCard);
		pluginManager.component('Tabs', async () => (await import('element-plus')).ElTabs);
		pluginManager.component('TabPane', async () => (await import('element-plus')).ElTabPane);
		pluginManager.component('RadioGroup', async () => (await import('element-plus')).ElRadioGroup);
		pluginManager.component('Radio', async () => (await import('element-plus')).ElRadio);
		pluginManager.component('Select', async () => (await import('element-plus')).ElSelect);
		pluginManager.component('SelectOptionGroup', async () => (await import('element-plus')).ElOptionGroup);
		pluginManager.component('SelectOption', async () => (await import('element-plus')).ElOption);
		pluginManager.component('Row', async () => (await import('element-plus')).ElRow);
		pluginManager.component('Col', async () => (await import('element-plus')).ElCol);
		pluginManager.component('Switch', async () => (await import('element-plus')).ElSwitch);
		pluginManager.component('Checkbox', async () => (await import('element-plus')).ElCheckbox);
		pluginManager.component('CheckboxGroup', async () => (await import('element-plus')).ElCheckboxGroup);
		pluginManager.component('Form', async () => (await import('element-plus')).ElForm);
		pluginManager.component('FormItem', async () => (await import('element-plus')).ElFormItem);
		pluginManager.component('FormItemRest', async () => h('div'));
		pluginManager.component('DatePicker', async () => (await import('element-plus')).ElDatePicker);
		pluginManager.component('TimePicker', async () => (await import('element-plus')).ElTimePicker);
		pluginManager.component('Cascader', async () => (await import('element-plus')).ElCascader);
		pluginManager.component('Tree', async () => (await import('element-plus')).ElTree);
		pluginManager.component('Empty', async () => (await import('element-plus')).ElEmpty);
		pluginManager.component('Table', async () => (await import('element-plus')).ElTable);
		pluginManager.component('TableColumn', async () => (await import('element-plus')).ElTableColumn);
		pluginManager.component('Pagination', async () => (await import('element-plus')).ElPagination);
		pluginManager.component('Tooltip', async () => (await import('element-plus')).ElTooltip);
		pluginManager.component('Timeline', async () => (await import('element-plus')).ElTimeline);
		pluginManager.component('TimelineItem', async () => (await import('element-plus')).ElTimelineItem);
		pluginManager.component('Tag', async () => (await import('element-plus')).ElTag);
		pluginManager.component('Badge', async () => (await import('element-plus')).ElBadge);
		pluginManager.component('Avatar', async () => (await import('element-plus')).ElAvatar);
		pluginManager.component('Skeleton', async () => (await import('element-plus')).ElSkeleton);
		pluginManager.component('Affix', async () => (await import('element-plus')).ElAffix);
		pluginManager.component('Container', async () => (await import('element-plus')).ElContainer);
		pluginManager.component('Header', async () => (await import('element-plus')).ElHeader);
		pluginManager.component('Main', async () => (await import('element-plus')).ElMain);
	},
};
